home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 October: Technology Seed / ADC Seed CD - October 1999.toast / FireWire / FireWire_2.0_SDK / Source / AVTransport / AVTransportController / AVTransportController.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-04-12  |  4.3 KB  |  169 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        AVTransportController.h
  3.  
  4.     Contains:    Definitions for AVTransportController application.
  5.  
  6.     Written by:    Guillermo Gallegos
  7.  
  8.     Copyright:    © 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <2*>     11/6/96    GG        Add Menu Items for snapshot.
  13.        <FW2>     9/16/96    GG        Filled in contains field.
  14.        <FW1>     9/16/96    GG        first checked in.
  15.  
  16. */
  17.  
  18.  
  19.  
  20. #ifndef __AVTRANSPORTCONTROLLER__
  21. #define __AVTRANSPORTCONTROLLER__
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27. #if PRAGMA_IMPORT_SUPPORTED
  28. #pragma import on
  29. #endif
  30.  
  31. #if PRAGMA_ALIGN_SUPPORTED
  32. #pragma options align=mac68k
  33. #endif
  34.  
  35. enum
  36. {
  37.     kDumpBufferSize                = 1000000
  38. };
  39.  
  40. // These are for positioning the Disk Initialization dialogs.
  41.  
  42. #define kDITop                    0x0050
  43. #define kDILeft                    0x0070
  44.  
  45. // kExtremeNeg and kExtremePos are used to set up wide open rectangles and
  46. // regions.
  47.  
  48. #define kExtremeNeg                (-32768)
  49. #define kExtremePos                (32767 - 1)                // Required to address an old region bug
  50.  
  51. enum
  52. {
  53.     kInvalidWindowRef            = 0
  54. };
  55.  
  56. enum
  57. {
  58.     kMenuBarResourceID            = 128,
  59.  
  60.     kControllerWindowResourceID    = 128,
  61.  
  62.     kStopRectResourceID            = 128,
  63.     kGoRectResourceID            = 129,
  64.  
  65.     kAboutAlertResourceID        = 128
  66. };
  67.  
  68. enum
  69. {
  70.     kAppleMenuID                = 128,
  71.     kAboutAppleMenuItem            = 1,
  72.  
  73.     kFileMenuID                    = 129,
  74.     kNewFileMenuItem            = 1,
  75.     kCloseFileMenuItem            = 4,
  76.     kQuitFileMenuItem            = 12,
  77.  
  78.     kEditMenuID                    = 130,
  79.     kUndoEditMenuItem            = 1,
  80.     kCutEditMenuItem            = 3,
  81.     kCopyEditMenuItem            = 4,
  82.     kPasteEditMenuItem            = 5,
  83.     kClearEditMenuItem            = 6,
  84.  
  85.     kExtraMenuID                = 131,
  86.     kPlayMenuItem                = 1,
  87.     kStopMenuItem                = 2,
  88.     kRecordMenuItem                = 3,
  89.     kRewindMenuItem                = 4,
  90.     kFastForwardMenuItem        = 5,
  91.     kPauseMenuItem                = 6,
  92.     kSlowMenuItem                = 7,
  93.     kNextFrameMenuItem            = 8,
  94.     kPreviousFrameMenuItem        = 9,
  95.  
  96.     kSnapShotMenuID                = 132,
  97.     kCaptureSnapShotMenuItem    = 1,
  98.     kPlaySnapShotMenuItem        = 2,
  99.     kStopSnapShotMenuItem        = 3
  100. };
  101.  
  102. struct AVTControllerAppDataStruct
  103. {
  104.     QDGlobals                    qdGlobals;                // Quickdraw globals for our application.
  105.  
  106.     struct ControllerDataStruct
  107.                                 *ControllerDataList;    // List of traffic lights.
  108.  
  109.     Rect                        stopRect,                // Rects for lights.
  110.                                 goRect;
  111.  
  112.     AEEventHandlerUPP            openApplicationEventHandler;    // Handler for open application events.
  113.     Boolean                        openApplicationEventHandlerInstalled;    // True if handler was successfully installed.
  114.  
  115.     AEEventHandlerUPP            openDocumentsEventHandler;    // Handler for open documents events.
  116.     Boolean                        openDocumentsEventHandlerInstalled;    // True if handler was successfully installed.
  117.  
  118.     AEEventHandlerUPP            printDocumentsEventHandler;    // Handler for print documents events.
  119.     Boolean                        printDocumentsEventHandlerInstalled;    // True if handler was successfully installed.
  120.  
  121.     AEEventHandlerUPP            quitApplicationEventHandler;    // Handler for quit application events.
  122.     Boolean                        quitApplicationEventHandlerInstalled;    // True if handler was successfully installed.
  123.  
  124.     AEEventHandlerUPP            deviceAddedEventHandler;    // Handler for device added events.
  125.     Boolean                        deviceAddedEventHandlerInstalled;    // True if handler was successfully installed.
  126.  
  127.     AEEventHandlerUPP            deviceRemovedEventHandler;    // Handler for device removed events.
  128.     Boolean                        deviceRemovedEventHandlerInstalled;    // True if handler was successfully installed.
  129.  
  130.     AVTClientID                    avtClientID;            // Our client ID for the AV transport control driver family.
  131.  
  132.     Ptr                            dumpBuffer;                // Buffer for dumping video.
  133.     UInt32                        dumpBufferSize;            // Size allocated for above buffer.
  134.     Boolean                        gotSnapShot;            // True if we've gotten a snap shot.
  135.  
  136.     Boolean                        inForeground;            // True if app is in foreground.
  137.     Boolean                        quit;                    // Flag to tell event loop to quit.
  138. };
  139. typedef struct AVTControllerAppDataStruct
  140.                                 AVTControllerAppData,
  141.                                 *AVTControllerAppDataPtr;
  142.  
  143. struct ControllerDataStruct
  144. {
  145.     struct ControllerDataStruct
  146.                                 *pNextControllerData;    // Link to next data record.
  147.     WindowRef                    ControllerWindowRef;    // Window reference for this traffic light.
  148.     AVTDriverID                    avtDriverID;        // Reference to driver we control.
  149.     Boolean                        snapShotPlaying;        // True if snap shot is playing.
  150.     Boolean                        stopped;                // State of traffic light.
  151. };
  152. typedef struct ControllerDataStruct
  153.                                 ControllerData,
  154.                                 *ControllerDataPtr;
  155.  
  156. #if PRAGMA_ALIGN_SUPPORTED
  157. #pragma options align=reset
  158. #endif
  159.  
  160. #if PRAGMA_IMPORT_SUPPORTED
  161. #pragma import off
  162. #endif
  163.  
  164. #ifdef __cplusplus
  165. }
  166. #endif
  167.  
  168. #endif /* __AVTRANSPORTController__ */
  169.